Skip to content

Conversation

jafraustro
Copy link
Contributor

@jafraustro jafraustro commented Aug 5, 2025

Motivation

  • Refine the DDP tutorial to make it device-agnostic by using the Accelerator API.

Description

  • Integrate the Accelerator API into the DDP tutorial to support multiple accelerators and improve backend initialization.
  • Align the implementation with this example from the PyTorch examples repository.

Checklist

  • The issue that is being fixed is referred in the description (see above "Fixes #ISSUE_NUMBER")
  • Only one issue is addressed in this pull request
  • Labels from the issue that this PR is fixing are added to this pull request
  • No unnecessary issues are included into this pull request.

CC: @gujinghui

cc @wconstab @osalpekar @H-Huang @kwen2501

Copy link

pytorch-bot bot commented Aug 5, 2025

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/tutorials/3508

Note: Links to docs will display an error until the docs builds have been completed.

✅ No Failures

As of commit 3eaab67 with merge base c4d9d93 (image):
💚 Looks good so far! There are no failures yet. 💚

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@meta-cla meta-cla bot added the cla signed label Aug 5, 2025
@sekyondaMeta sekyondaMeta requested a review from fegin August 6, 2025 16:32
@sekyondaMeta
Copy link
Contributor

@fegin could you take a look at this when you get a chance

@fegin
Copy link

fegin commented Sep 10, 2025

Sorry for missing this earlier. The tutorial looks good to me. As long as the example doesn’t break any existing CUDA use cases, I think it’s fine. I just wanted to confirm.

@jafraustro
Copy link
Contributor Author

Sorry for missing this earlier. The tutorial looks good to me. As long as the example doesn’t break any existing CUDA use cases, I think it’s fine. I just wanted to confirm.

Hi @fegin, the changes do not break the CUDA case. The example https://github.com/pytorch/examples/blob/main/distributed/ddp/example.py is derived from the tutorial and incorporates the Accelerator API effectively.

@fegin
Copy link

fegin commented Sep 12, 2025

Can you rebase to the main?

…nd improve backend initialization

Signed-off-by: jafraustro <jaime.fraustro.valdez@intel.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants